From 596bb4bea55e5107908022cb97b00850470ee95b Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 7 Oct 2006 23:38:39 +0000 Subject: [PATCH] Add cadence to XCSV. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2386 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/csv_util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gpsbabel/csv_util.c b/gpsbabel/csv_util.c index 3b0b907ea..e0817d44c 100644 --- a/gpsbabel/csv_util.c +++ b/gpsbabel/csv_util.c @@ -980,6 +980,9 @@ xcsv_parse_val(const char *s, waypoint *wpt, const field_map_t *fmp) if ( strcmp( fmp->key, "HEART_RATE") == 0) { wpt->heartrate = atoi(s); } else + if ( strcmp( fmp->key, "CADENCE") == 0) { + wpt->cadence = atoi(s); + } else if ( strcmp( fmp->key, "PATH_DISTANCE_KM") == 0 ) { /* Ignored on input */ } else { @@ -1330,6 +1333,10 @@ xcsv_waypt_pr(const waypoint *wpt) if (strcmp(fmp->key, "HEART_RATE") == 0) { writebuff(buff, fmp->printfc, wpt->heartrate); } else + /* CADENCE CONVERSION***********************************************/ + if (strcmp(fmp->key, "CADENCE") == 0) { + writebuff(buff, fmp->printfc, wpt->cadence); + } else /* TIME CONVERSIONS**************************************************/ if (strcmp(fmp->key, "EXCEL_TIME") == 0) { /* creation time as an excel (double) time */ -- 2.30.2